<template>
  <div class="tm-app-list">
    <div class="tm-app-list--item" v-for="(item, i) in apps" :key="i" @click="handleClick(item)">
      <i :class="item.icon"></i>
      <div class="tm-app-list--title">{{ item.title }}</div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'TmAppList',
  data() {
    return {
      apps: [
        {
          title: '数据中心',
          icon: 'el-icon-s-data',
          dialog: 'TmStorage'
        }
      ]
    }
  },
  methods: {
    handleClick(item) {
      this.$modal.dialog(item.dialog, {
        props: {
          title: item.title,
          width: '80%',
          height: '80%'
        }
      })
    }
  }
}
</script>
